<template>
  <el-row justify="left" style="margin-top: 20px; margin: 50px">
    <el-space wrap> <el-button type="primary" @click="add">新增救助站</el-button> </el-space>
  </el-row>
  <el-row justify="left" style="margin-top: 20px; margin: 50px">
    <el-table
      :data="tableData"
      style="width: 60%"
      :row-class-name="tableRowClassName"
      border
      stripe
    >
      <el-table-column label="救助站照片" width="120">
        <template #default="scope">
          <el-image style="width: 100px; height: 100px" :src="scope.row.avatar" />
        </template>
      </el-table-column>
      <el-table-column prop="home_name" label="救助站名称" width="120" />
      <el-table-column prop="address" label="救助站地址" width="180" />
      <el-table-column prop="name" label="联系人" width="120" />
      <el-table-column prop="number" label="联系电话" />
    </el-table>
  </el-row>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import { ref } from 'vue'
import helphome1 from '../../assets/helphome1.jpg'
import helphome2 from '../../assets/helphome2.jpg'
const input = ref('')
const tableData = ref([
  {
    avatar: helphome1,
    home_name: '救助站1号',
    address: '广州市南沙区',
    name: '王五',
    number: '15712151736'
  },
  {
    avatar: helphome2,
    home_name: '救助站2号',
    address: '郑州市金水区',
    name: '张三',
    number: '15712151736'
  }
])
import router from '@/router'
const handleEdit = (index, row) => {
  console.log(index)
  console.log(row.name)
}
const add = () => {
  console.log('hhh')
  router.push({ path: '/pet8' })
}
</script>
